package com.beiding.workordersystem.orders.generalorder.dao;

import com.beiding.workordersystem.common.dao.ExpandBaseMapper;
import com.beiding.workordersystem.orders.generalorder.entity.OrderProcess;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderProcessDao extends ExpandBaseMapper<OrderProcess> {
    void substitution(@Param("from") String from,@Param("to") String to);
    Integer getStatus(String id);
    OrderProcess getStatusAndPrincipalId(String id);
    void exception(@Param("id") String id,@Param("exception") String exception);

    void active(@Param("id") String id);

    OrderProcess getStatusOrderId(String id);

    void updateStatus(@Param("id") String id,@Param("status") int status);

    void activeFirst(String orderId);

    void changePrincipalAndRestart(@Param("id") String id,@Param("principalId") String principalId);

    OrderProcess getStatusOrderIdPrincipalId(String id);

    void setPrincipalIdAndContinue(@Param("orderId") String orderId, @Param("principalId") String principalId, @Param("sort") Integer sort);

    Integer getActiveSort(String orderId);

    void setCurrent(String nextProcessId);

}
